package com.feng.gameproj;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;

public class SurfaceActivity extends Activity 
{
	private GameSurface gameSurface = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		
		this.gameSurface = new GameSurface (this);
		setContentView (this.gameSurface);
		
	}

	@Override
	public boolean onKeyUp(int keyCode, KeyEvent event) 
	{
		switch (keyCode)
		{
			case KeyEvent.KEYCODE_DPAD_UP:
				this.gameSurface.y -= 5;
				break;
			case KeyEvent.KEYCODE_DPAD_DOWN:
				this.gameSurface.y += 5;
				break;
			default:
				break;
		}
		
		return super.onKeyUp(keyCode, event);
	}
	
	

}
